package com.mjf.cjt.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * desc
 * </p>
 *
 * @author chenshoumeng
 * @date 2025/8/6 23:22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class PushArrivalCreateVO {
    @JsonProperty("dto")
    private Dto dto;
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class Dto {
        @JsonProperty("ExternalCode")
        private String ExternalCode; // 外部编码
        @JsonProperty("Code")
        private String Code; // 编码
        @JsonProperty("BusinessType")
        private BusinessType BusinessType;
        @JsonProperty("Partner")
        private Partner Partner;
        @JsonProperty("Warehouse")
        private Warehouse Warehouse;
        @JsonProperty("VoucherDetails")
        private List<Details> voucherDetails;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class Details {
        @JsonProperty("Code")
        private String Code; // 行号，从1开始增长
        @JsonProperty("Inventory")
        private Inventory Inventory; // 商品
        @JsonProperty("Quantity")
        private BigDecimal Quantity; //  数量
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class BusinessType {
        @JsonProperty("Code")
        private String Code; // 业务类型编码
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class Partner {
        @JsonProperty("Code")
        private String Code; // 供应商编码
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class Warehouse {
        @JsonProperty("Code")
        private String Code; // 仓库编码

        @JsonProperty("Name")
        private String Name; // 仓库名称
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class Inventory {
        @JsonProperty("Code")
        private String Code; // 商品编码

        @JsonProperty("Name")
        private String Name;
    }


}
